<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>mysqli_result类</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="mysqli-stmt.store-result.html">mysqli_stmt::store_result</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="mysqli-result.current-field.html">mysqli_result::$current_field</a></div>
 <div class="up"><a href="book.mysqli.html">Mysqli</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="class.mysqli-result" class="reference">
 <h1 class="title">mysqli_result类</h1>
 
 
 <div class="partintro"><p class="verinfo">(PHP 5)</p>
 

  <div class="section" id="mysqli-result.intro">
   <h2 class="title">简介</h2>
   <p class="para">
   代表从一个数据库查询中获取的结果集。
   </p>

   <p class="para">
    <em class="emphasis">更新日志</em>
   </p>

   <table class="doctable table">
    <caption><strong>更新日志</strong></caption>
    
     <thead>
      <tr>
       <th>版本</th>
       <th>说明</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>5.4.0</td>
       <td>
        <strong class="classname">Iterator</strong> support was added, as <strong class="classname">mysqli_result</strong>
        now implements <strong class="classname">Traversable</strong>.
       </td>
      </tr>

     </tbody>
    
   </table>
  

  </div>

 
  <div class="section" id="mysqli-result.synopsis">
   <h2 class="title">类摘要</h2>
 

   <div class="classsynopsis">
    <div class="ooclass"></div>
 

    <div class="classsynopsisinfo">
     <span class="ooclass">
      <strong class="classname">mysqli_result</strong>
     </span>
     {</div>

 
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 属性 */</div>
    <div class="fieldsynopsis">
   <span class="type">int</span> <var class="varname"><a href="mysqli-result.current-field.html">$<var class="varname">current_field</var></a></var>
  ;</div>
<div class="fieldsynopsis"><span class="type">int</span> <var class="varname"><a href="mysqli-result.field-count.html">$<var class="varname">field_count</var></a></var>;</div>
<div class="fieldsynopsis"><span class="type">array</span> <var class="varname"><a href="mysqli-result.lengths.html">$<var class="varname">lengths</var></a></var>;</div>
<div class="fieldsynopsis"><span class="type">int</span> <var class="varname"><a href="mysqli-result.num-rows.html">$<var class="varname">num_rows</var></a></var>;</div>

 
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="methodsynopsis dc-description">
   <span class="type">int</span><span class="methodname"><strong>mysqli_field_tell</strong></span>
    ( <span class="methodparam"><span class="type"><a href="class.mysqli-result.html" class="type mysqli_result">mysqli_result</a></span> <code class="parameter">$result</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="type">bool</span><span class="methodname"><a href="mysqli-result.data-seek.html" class="methodname">data_seek</a></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$offset</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="type">mixed</span><span class="methodname"><a href="mysqli-result.fetch-all.html" class="methodname">fetch_all</a></span>
    ([ <span class="methodparam"><span class="type">int</span> <code class="parameter">$resulttype</code><span class="initializer"> = MYSQLI_NUM</span></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="type">mixed</span><span class="methodname"><a href="mysqli-result.fetch-array.html" class="methodname">fetch_array</a></span>
    ([ <span class="methodparam"><span class="type">int</span> <code class="parameter">$resulttype</code><span class="initializer"> = MYSQLI_BOTH</span></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="type">array</span><span class="methodname"><a href="mysqli-result.fetch-assoc.html" class="methodname">fetch_assoc</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="type">object</span><span class="methodname"><a href="mysqli-result.fetch-field-direct.html" class="methodname">fetch_field_direct</a></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$fieldnr</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="type">object</span><span class="methodname"><a href="mysqli-result.fetch-field.html" class="methodname">fetch_field</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="type">array</span><span class="methodname"><a href="mysqli-result.fetch-fields.html" class="methodname">fetch_fields</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="type">object</span><span class="methodname"><a href="mysqli-result.fetch-object.html" class="methodname">fetch_object</a></span>
    ([ <span class="methodparam"><span class="type">string</span> <code class="parameter">$class_name</code></span>
   [, <span class="methodparam"><span class="type">array</span> <code class="parameter">$params</code></span>
  ]] )</div>
<div class="methodsynopsis dc-description">
   <span class="type">mixed</span><span class="methodname"><a href="mysqli-result.fetch-row.html" class="methodname">fetch_row</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="type">int</span><span class="methodname"><strong>mysqli_num_fields</strong></span>
    ( <span class="methodparam"><span class="type"><a href="class.mysqli-result.html" class="type mysqli_result">mysqli_result</a></span> <code class="parameter">$result</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="type">bool</span><span class="methodname"><a href="mysqli-result.field-seek.html" class="methodname">field_seek</a></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$fieldnr</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="type">void</span><span class="methodname"><a href="mysqli-result.free.html" class="methodname">free</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="type">array</span><span class="methodname"><strong>mysqli_fetch_lengths</strong></span>
    ( <span class="methodparam"><span class="type"><a href="class.mysqli-result.html" class="type mysqli_result">mysqli_result</a></span> <code class="parameter">$result</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="type">int</span><span class="methodname"><strong>mysqli_num_rows</strong></span>
    ( <span class="methodparam"><span class="type"><a href="class.mysqli-result.html" class="type mysqli_result">mysqli_result</a></span> <code class="parameter">$result</code></span>
   )</div>

   }</div>

 
  </div>
 
 </div>
 
 



























































































<h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li><a href="mysqli-result.current-field.html">mysqli_result::$current_field</a> — Get current field offset of a result pointer</li><li><a href="mysqli-result.data-seek.html">mysqli_result::data_seek</a> — Adjusts the result pointer to an arbitrary row in the result</li><li><a href="mysqli-result.fetch-all.html">mysqli_result::fetch_all</a> — Fetches all result rows as an associative array, a numeric array, or both</li><li><a href="mysqli-result.fetch-array.html">mysqli_result::fetch_array</a> — Fetch a result row as an associative, a numeric array, or both</li><li><a href="mysqli-result.fetch-assoc.html">mysqli_result::fetch_assoc</a> — Fetch a result row as an associative array</li><li><a href="mysqli-result.fetch-field-direct.html">mysqli_result::fetch_field_direct</a> — Fetch meta-data for a single field</li><li><a href="mysqli-result.fetch-field.html">mysqli_result::fetch_field</a> — Returns the next field in the result set</li><li><a href="mysqli-result.fetch-fields.html">mysqli_result::fetch_fields</a> — Returns an array of objects representing the fields in a result set</li><li><a href="mysqli-result.fetch-object.html">mysqli_result::fetch_object</a> — Returns the current row of a result set as an object</li><li><a href="mysqli-result.fetch-row.html">mysqli_result::fetch_row</a> — Get a result row as an enumerated array</li><li><a href="mysqli-result.field-count.html">mysqli_result::$field_count</a> — Get the number of fields in a result</li><li><a href="mysqli-result.field-seek.html">mysqli_result::field_seek</a> — Set result pointer to a specified field offset</li><li><a href="mysqli-result.free.html">mysqli_result::free</a> — Frees the memory associated with a result</li><li><a href="mysqli-result.lengths.html">mysqli_result::$lengths</a> — Returns the lengths of the columns of the current row in the result set</li><li><a href="mysqli-result.num-rows.html">mysqli_result::$num_rows</a> — Gets the number of rows in a result</li></ul>
</div>
<hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="mysqli-stmt.store-result.html">mysqli_stmt::store_result</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="mysqli-result.current-field.html">mysqli_result::$current_field</a></div>
 <div class="up"><a href="book.mysqli.html">Mysqli</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
